<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box1 {
      width: 600px;
      height: 200px;
      /* background: linear-gradient(方向,颜色,颜色,...); */
      background: linear-gradient(to right, skyblue, pink);
    }

    .box2 {
      width: 600px;
      height: 200px;
      /* background: radial-gradient(形状 大小 方向,颜色.....); */
      /* farthest-corner (默认) : 指定径向渐变的半径长度为从圆心到离圆心最远的角
closest-side ：指定径向渐变的半径长度为从圆心到离圆心最近的边
closest-corner ： 指定径向渐变的半径长度为从圆心到离圆心最近的角
farthest-side ：指定径向渐变的半径长度为从圆心到离圆心最远的边 */
      background: radial-gradient(circle closest-side at center, skyblue, pink);
    }
  </style>
</head>

<body>
  <div class="box1"></div>
  <hr>
  <div class="box2"></div>
</body>

</html>